<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * Description: 模型基类
 *
 * @author      Eden
 * @datetime    2016/11/26 16:10
 * @copyright   Beijing CmsTop Technology Co.,Ltd.
 */

class WAP_Model extends CI_Model
{
    // 错误提示
    private $error = '';

    /**
     * 继承基类方法
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 设置错误消息
     * @param string $error
     */
    protected function setError($error = '')
    {
        $this->error = $error;
    }

    /**
     * 获取错误消息
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

    protected function _getStreamUrl($streamId = 0)
    {
        $db = clone($this->db);
        $q = $db->select('videoUrlHD, videoUrlSD, status')->get_where('stream_device', array('id' => $streamId));
        return $q->row_array();
    }
}
